package com.songshuai.webapi.crm.dao;

import com.songshuai.webapi.crm.dto.po.ClueImportBodyPojo;
import com.songshuai.webapi.crm.dto.po.ClueImportHeaderPojo;
import com.songshuai.webapi.crm.dto.request.customer.CustomerListReqDto;
import com.songshuai.webapi.crm.model.CustomInfo;
import org.apache.ibatis.annotations.Param;
import java.util.List;

/**
 * CustomInfoMapper继承基类
 */

public interface CustomInfoMapper {

    CustomInfo selectByPrimaryKey(String customId);
    Integer deleteByPrimaryKey(String customId);
    Integer insertSelective(CustomInfo customInfo);
    Integer updateByPrimaryKeySelective(CustomInfo customInfo);
    //查询手机号是否唯一
    CustomInfo selectByPhone(CustomInfo customInfo);

    Integer selectNumByOwner(Integer owner);
    //根据校区id、手机号查询学员信息
    CustomInfo queryCustomByMobile(@Param("campusId")Integer CampusId,@Param("phone")String phone);
    //读取学员编号后六位最大值
    int queryMaxCustomeNo(@Param("campusId")Integer campusId,@Param("subLeng")Integer subLeng);
    //新增潜在学员
    int addCustomer(CustomInfo customInfo);
    //查询符合条件的学员信息列表
    List<CustomInfo> queryCustomerInfoListByParam(CustomerListReqDto reqDto);
    //今日待跟进总计
    int queryFollowCustomerCount(@Param("campusId") Integer CampusId);
    //学员线索信息导入，批量插入
    int insertBatch(@Param("list")List<ClueImportBodyPojo> list, @Param("clueImportHeaderPojo") ClueImportHeaderPojo clueImportHeaderPojo);
}